<template>
	<view class="pagesBox">
		<u-time-line>
			<u-time-line-item v-for="(item,index) in list" :key="index">
				<!-- 此处没有自定义左边的内容，会默认显示一个点 -->
				<template v-slot:content>
					<view>
						<view class="u-order-desc">{{item.context}}</view>
						<view class="u-order-time">{{item.time}}</view>
					</view>
				</template>
			</u-time-line-item>
		</u-time-line>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list:[]
			};
		},
		onLoad(options) {
			this.getLogistics(options.id)
		},
		methods:{
			async getLogistics(id){
				let res = await uni.$http('POST','order/logistics',{id});
				if(res.code == 1){
					this.list = res.data
				}else{
					uni.$u.toast(res.msg)
					setTimeout(()=>{
						uni.navigateBack()
					},1000)
				}
			},
		}
	}
</script>

<style scoped lang="scss">
.pagesBox{
	color: #000;
	padding: 12rpx 24rpx;
}
</style>
<style>
	page{
		background-color: #f7f8fa;
	}
</style>